package com.yexiao.cofe.business.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * @author lkl
 * @since 2025/3/31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("store_product")
public class StoreProduct {

    /**
     * 自增主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 门店ID
     */
    @TableField("store_id")
    private String storeId;

    /**
     * 商品业务ID
     */
    @TableField("product_id")
    private int productId;

    /**
     * 参数模板ID
     */
    @TableField("param_template_id")
    private int paramTemplateId;

    /**
     * 状态（0-下架,1-上架,2-售罄）
     */
    @TableField("status")
    private int status;

    /**
     * 逻辑删除（0-未删除,1-已删除）
     */
    @TableField("is_del")
    @TableLogic
    private int isDel;

    /**
     * 库存
     */
    @TableField("stock")
    private Integer stock;

    /**
     * 价格偏移
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 创建人
     */
    @TableField("create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private String createTime;

    /**
     * 更新者
     */
    @TableField("update_user")
    private String updateUser;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private String updateTime;

    public static final String COL_ID = "id";
    public static final String COL_STORE_ID = "store_id";
    public static final String COL_PRODUCT_ID = "product_id";
    public static final String COL_PARAM_TEMPLATE_ID = "param_template_id";
    public static final String COL_STATUS = "status";
    public static final String COL_IS_DEL = "is_del";
    public static final String COL_STOCK = "stock";
    public static final String COL_PRICE = "price";
    public static final String COL_CREATE_USER = "create_user";
    public static final String COL_CREATE_TIME = "create_time";
    public static final String COL_UPDATE_USER = "update_user";
    public static final String COL_UPDATE_TIME = "update_time";
}
